import 'package:flutter/material.dart';
import 'package:intl/intl.dart';

class DetailPage extends StatelessWidget {
  final String title;

  DetailPage(this.title);

  @override
  Widget build(BuildContext context) {
    return new Scaffold(
      appBar: new AppBar(title: new Text("会议详情")),
      body: new DetailHomePage(title),
    );
  }
}

class DetailHomePage extends StatefulWidget {
 final String title;

  DetailHomePage(this.title);

  @override
  State<StatefulWidget> createState() {
    return new DetailHomeState(title);
  }
}

class DetailHomeState extends State {
  String title;

  DetailHomeState(this.title);

  String _getTime(){
    var now = new DateTime.now();
    var formatter = new DateFormat('yyyy-MM-dd');
    String formatted = formatter.format(now);
    return formatted;
  }

  @override
  Widget build(BuildContext context) {
    return new ListView(
      children: <Widget>[
        new Text(title),
        new Row(
          children: <Widget>[
            new Text("时间:"),
            new Text(_getTime()),
          ],
        ),
        new Text(
          "考核标准:处事方式大嫁风尚解放路水电费了水电费了书法家适得府君书地方了水电费了水电费水电费收代理费",
          softWrap: true,
        )
      ],
    );
  }
}
